﻿namespace EFS.RC.Survey.Common
{
	public static class Functions
	{
		#region Utilities
		/// StartSurveyExternal
		public static void StartSurveyExternal(
			System.Guid conversationGuid,
			System.Int32 surveyId)
		{
			// crete url
			System.Text.StringBuilder sbUrl = new System.Text.StringBuilder();
			sbUrl.AppendFormat("{0}/index.aspx?cmd=score_ext&cnv_guid={1}&srv_id={2}",
				EFS.RC.Survey.Controls.Common.Functions.HostFullUrl,
				conversationGuid,
				surveyId);

			// open
			System.Windows.Browser.HtmlPage.Window.Navigate(
				new System.Uri(sbUrl.ToString()),
				"__blank",
				"fullscreen=no,status=yes,toolbar=no,location=yes,menubar=no,directories=no,resizable=yes,scrollbars=yes");
		}
		#endregion
	}

}